.tooltip {
  position: absolute;
  box-sizing: border-box;
  max-width: 250px;
  padding: 8px 12px;
  border-radius: 6px;
  background-color: rgba(33, 33, 33, 0.95);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}

/* 可以根据鼠标悬停交互 */
.tooltip:hover {
  pointer-events: auto;
}

.content {
  position: relative;
  z-index: 1;
}

/* 箭头样式 */
.hasArrow .arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background-color: inherit;
  transform: rotate(45deg);
}

/* 箭头位置 */
.arrow-top {
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.arrow-top-start {
  bottom: -5px;
  left: 16px;
  transform: rotate(45deg);
}

.arrow-top-end {
  bottom: -5px;
  right: 16px;
  transform: rotate(45deg);
}

.arrow-bottom {
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.arrow-bottom-start {
  top: -5px;
  left: 16px;
  transform: rotate(45deg);
}

.arrow-bottom-end {
  top: -5px;
  right: 16px;
  transform: rotate(45deg);
}

.arrow-left {
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.arrow-left-start {
  right: -5px;
  top: 16px;
  transform: rotate(45deg);
}

.arrow-left-end {
  right: -5px;
  bottom: 16px;
  transform: rotate(45deg);
}

.arrow-right {
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.arrow-right-start {
  left: -5px;
  top: 16px;
  transform: rotate(45deg);
}

.arrow-right-end {
  left: -5px;
  bottom: 16px;
  transform: rotate(45deg);
}

/* 动画效果 */
.animation-fade {
  transition: opacity 0.2s;
}

.animation-scale {
  transition: opacity 0.2s, transform 0.2s;
  transform: scale(0.8);
}

.animation-scale.visible {
  transform: scale(1);
}

.animation-slide.placement-top,
.animation-slide.placement-top-start,
.animation-slide.placement-top-end {
  transform: translateY(10px);
}

.animation-slide.placement-bottom,
.animation-slide.placement-bottom-start,
.animation-slide.placement-bottom-end {
  transform: translateY(-10px);
}

.animation-slide.placement-left,
.animation-slide.placement-left-start,
.animation-slide.placement-left-end {
  transform: translateX(10px);
}

.animation-slide.placement-right,
.animation-slide.placement-right-start,
.animation-slide.placement-right-end {
  transform: translateX(-10px);
}

.animation-slide.visible {
  transform: translate(0, 0);
}

/* 位置样式微调 */
.placement-top,
.placement-top-start,
.placement-top-end {
  margin-bottom: 10px;
}

.placement-bottom,
.placement-bottom-start,
.placement-bottom-end {
  margin-top: 10px;
}

.placement-left,
.placement-left-start,
.placement-left-end {
  margin-right: 10px;
}

.placement-right,
.placement-right-start,
.placement-right-end {
  margin-left: 10px;
}
